package com.wintrisstech.iaroc.sunspot.test;

import com.sun.spot.sensorboard.EDemoBoard;
import com.sun.spot.sensorboard.io.IIOPin;
import com.sun.spot.util.Utils;

import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

/**
 * The startApp method of this class is called by the VM to start the
 * application.
 */
public class MidletTestPin extends MIDlet {

    protected void startApp() throws MIDletStateChangeException {
        IIOPin pin = EDemoBoard.getInstance().getIOPins()[EDemoBoard.D0];
        pin.setAsOutput(true);
        while (true) {
            pin.setHigh();
            Utils.sleep(50);
            pin.setLow();
        }
    }

    protected void pauseApp() {
    }

    protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
    }
    
}
